#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QTimeLine>
#include <QPainter>
#include <QDateTime>
#include <string>
#include<QTextEdit>
#include <QMainWindow>
#include <QWidget>
#include <QPaintEvent>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButton_rectangle_clicked();

    void on_pushButton_circle_clicked();

    void on_pushButton_triangle_clicked();

    void on_pushButton_line_clicked();

protected:
    void paintEvent(QPaintEvent *);
private:
    Ui::MainWindow *ui;
       int w=100,h=100;
       int x=20,y=20;
       bool crcle=0;//标志是否点击按钮
       bool squer=0;
       bool Polygon=0;
       bool line=0;
     };
#endif // MAINWINDOW_H
